<template>
  <div class="sett">
    <div class="sett-top">
      <span>收货地址</span>
      <div class="sett-list">
        <div class="sett-item">
          <div class="sett-name">张三</div>
          <div class="sett-phone">130***999</div>
          <div class="sett-address">四川省成都市锦江区</div>
        </div>
        <div class="sett-item">
          <div class="sett-name">张三</div>
          <div class="sett-phone">130***999</div>
          <div class="sett-address">四川省成都市锦江区</div>
        </div>
        <div class="sett-item">
          <div class="sett-name">张三</div>
          <div class="sett-phone">130***999</div>
          <div class="sett-address">四川省成都市锦江区</div>
        </div>
        <div class="sett-item">
          <div class="address">
            <div>
              <div class="address-icon">
                <img src="../../assets/img/加号.png" alt="" />
              </div>
              <div class="address-add">添加新的地址</div>
            </div>
          </div>
        </div>
      </div>
      <div class="detail-section">
        <div class="detail-header">商品</div>
        <div class="good-item" v-for="item in selectedData" :key="item.id">
          <div class="good-img">
            <img :src="item.src" alt="">
          </div>
          <div class="good-title">
            {{ item.General }}{{ item.corlo1 }}
          </div>
          <div class="good-price">{{ item.price }} x {{ item.num }}</div>
          <div class="good-sum">{{ item.price * item.num }}元</div>
        </div>
      </div>
    </div>
    <div class="Distr">
      <span>配送方式</span>
      <span class="Distr-item">包邮</span>
    </div>
    <div class="come">
      <div class="return" @click="returnShopping">返回购物车</div>
      <div class="settlement" @click="getSucceed">结算({{ totalPrice }}元)</div>
    </div>

  </div>
</template>
<script>
export default {
  props: {
    selectedData: {
      type: Array
    },
    totalPrice: {
      type: Number,
      default: null
    },
  },
  created() {
  },
  data() {
    return {
    };
  },
  methods: {
    returnShopping() {
      //返回购物车
      this.$emit('getShopping')
      localStorage.removeItem('selectedDate');
    },
    getSucceed() {
      this.$emit('getSucceed')

    },

  }
};
</script>
<style scoped>
@import url("../../assets/css/font_4367545_5vuckvup5pp/iconfont.css");

.sett {
  position: relative;
  margin: 50px auto;
  width: 1226px;
  /* height: 100vh; */
  background-color: #fff;
}

.sett-top {
  margin-top: 40px;
  width: 100%;
  /* height: 241px; */
  background-color: #fff;
}

.sett-top span {
  margin-left: 20px;
  line-height: 80px;
  color: #333;
  font-size: 18px;
}

.sett-list {
  display: flex;
  justify-content: space-around;
}

.sett-item {
  width: 269px;
  height: 179px;
  border: 1px solid #e0e0e0;
}

.sett-item .sett-name {
  text-align: center;
  margin-right: 10px;
  font-size: 18px;
  color: #333;
  line-height: 50px;
  margin-bottom: 10px;
}

.sett-item .sett-phone {
  text-align: center;
  font-size: 14px;
  line-height: 22px;
  color: #757575;
}

.sett-item .sett-address {
  text-align: center;
  font-size: 14px;
  line-height: 50px;
  color: #757575;
}

.sett-item .address {
  width: 100px;
  margin: 70px auto;
  text-align: center;
}

.sett-item .address .address-icon {
  margin: auto;
  width: 25px;
  height: 25px;
}

.sett-item .address .address-icon img {
  width: 100%;
  height: 100%;
}

.address-add {
  font-size: 14px;
  color: #757575;
}

.detail-section {
  width: 1178px;
}

.detail-header {
  margin-left: 20px;
  line-height: 80px;
  color: #333;
  font-size: 18px;
}

.good-item {
  margin-top: 10px;
  margin-left: 25px;
  width: 1178px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  border-bottom: 1px solid #e0e0e0;

}

.good-img {
  width: 70px;
  height: 70px;
}

.good-img img {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.good-title {
  width: 650px;
  margin-left: 20px;
  color: #424242;
}

.good-price {
  width: 150px;
  text-align: center;
  color: #424242;
}

.good-sum {
  width: 190px;
  text-align: right;
  color: #ff6701;
}

.Distr {
  margin-top: 30px;
  margin-left: 40px;
  width: 500px;
  height: 40px;
  /* border-bottom: 1px solid #e0e0e0; */
}

.Distr .Distr-item {
  color: #ff6700;
}

.come {
  /* margin-top: 0px; */
  /* width: 400px; */
  height: 81px;
  /* border-top: 1px solid #e0e0e0; */
  display: flex;
  align-items: center;
  justify-content: flex-end;

}

.return {
  display: inline-block;
  width: 158px;
  height: 38px;
  padding: 0;
  margin: 0;
  border: 1px solid #b0b0b0;
  font-size: 14px;
  line-height: 38px;
  text-align: center;
  color: #b0b0b0;
  cursor: pointer;
  -webkit-transition: all .4s;
  transition: all .4s;
  margin-right: 20px;
}

.settlement {
  display: inline-block;
  width: 158px;
  height: 38px;
  padding: 0;
  margin: 0;
  border: 1px solid #ff6700;
  background: #ff6700;
  border-color: #ff6700;
  color: #fff;
  font-size: 14px;
  line-height: 38px;
  text-align: center;
  cursor: pointer;
  -webkit-transition: all .4s;
  transition: all .4s;
  margin-right: 20px;
}
</style>